<template>
  <div>
    <div class="containerContent">
      <div class="one">
        <div class="infotitle">业务单据参数</div>
        <div class="checkbox" v-if="basicInfoList.length > 0">
          <el-checkbox
            v-if="basicInfoObj.enable_price_tracking"
            class="checkboxStyle"
            key="enable_price_tracking"
            true-label="1"
            false-label="0"
            v-model="basicInfoObj.enable_price_tracking.value"
            >启用价格跟踪</el-checkbox
          >

          <el-checkbox
            v-if="basicInfoObj.enable_discount_tracking"
            class="checkboxStyle"
            key="enable_discount_tracking"
            true-label="1"
            false-label="0"
            v-model="basicInfoObj.enable_discount_tracking.value"
            >启用折扣追踪</el-checkbox
          >

          <el-checkbox
            v-if="basicInfoObj.allow_multi_line_entry_goods_info"
            class="checkboxStyle"
            key="allow_multi_line_entry_goods_info"
            true-label="1"
            false-label="0"
            v-model="basicInfoObj.allow_multi_line_entry_goods_info.value"
            >允许同一商品信息多行录入</el-checkbox
          >

          <el-checkbox
            v-if="basicInfoObj.open_new_order_after_document_saved"
            class="checkboxStyle"
            key="open_new_order_after_document_saved"
            true-label="1"
            false-label="0"
            v-model="basicInfoObj.open_new_order_after_document_saved.value"
            >单据保存后立即开新单</el-checkbox
          >

          <el-checkbox
            v-if="basicInfoObj.verify_order_after_document_saved"
            class="checkboxStyle"
            key="verify_order_after_document_saved"
            true-label="1"
            false-label="0"
            v-model="basicInfoObj.verify_order_after_document_saved.value"
            >单据保存后立即审核</el-checkbox
          >

          <el-checkbox
            v-if="basicInfoObj.open_new_order_after_document_verify"
            class="checkboxStyle"
            key="open_new_order_after_document_verify"
            true-label="1"
            false-label="0"
            v-model="basicInfoObj.open_new_order_after_document_verify.value"
            >单据审核后立即开新单</el-checkbox
          >
          <!-- <template v-for="(item, index) in basicInfoList">
            <el-checkbox class="checkboxStyle" :key="index" v-if="index >= 18 && index < 24" v-model="item.value"
              true-label="1" false-label="0">{{ getTitle(item.description) }}
            </el-checkbox>
          </template> -->
          <div class="lastCheckbox" v-if="!isBaseVersion"></div>
          <el-checkbox
            v-if="basicInfoObj.allow_negative_inventory && !isBaseVersion"
            class="checkboxStyle"
            key="allow_negative_inventory"
            true-label="1"
            false-label="0"
            v-model="basicInfoObj.allow_negative_inventory.value"
            @change="inventoryChange($event, 'allow_negative_inventory')"
            >允许负库存</el-checkbox
          >

          <el-checkbox
            v-if="basicInfoObj.prompt_on_save && !isBaseVersion"
            class="checkboxStyle"
            key="prompt_on_save"
            true-label="1"
            false-label="0"
            v-model="basicInfoObj.prompt_on_save.value"
            >保存时提示</el-checkbox
          >

          <el-checkbox
            v-if="basicInfoObj.prompt_on_verify && !isBaseVersion"
            class="checkboxStyle"
            key="prompt_on_verify"
            true-label="1"
            false-label="0"
            v-model="basicInfoObj.prompt_on_verify.value"
            @change="inventoryChange($event, 'prompt_on_verify')"
            >审核时提示</el-checkbox
          >
          <!-- <template v-for="(item, index) in basicInfoList">
            <el-checkbox class="checkboxStyle" :key="index" v-if="index >= 24 && index < 27" v-model="item.value"
              true-label="1" false-label="0" @change="inventoryChange($event, index)">{{ getTitle(item.description) }}
            </el-checkbox>
          </template> -->
        </div>
      </div>
      <div class="one">
        <div class="infotitle">单据操作</div>
        <div class="checkbox" v-if="basicInfoList.length > 0">
          <el-checkbox
            v-if="basicInfoObj.print_after_save_sale"
            class="checkboxStyle"
            key="print_after_save_sale"
            true-label="1"
            false-label="0"
            v-model="basicInfoObj.print_after_save_sale.value"
            >销售开单保存后立即打印</el-checkbox
          >

          <el-checkbox
            v-if="basicInfoObj.print_after_verify"
            class="checkboxStyle"
            key="print_after_verify"
            true-label="1"
            false-label="0"
            v-model="basicInfoObj.print_after_verify.value"
            >单据审核后打印</el-checkbox
          >

          <el-checkbox
            v-if="basicInfoObj.skip_line_after_product_entry"
            class="checkboxStyle"
            key="skip_line_after_product_entry"
            true-label="1"
            false-label="0"
            v-model="basicInfoObj.skip_line_after_product_entry.value"
            >商品录入后立即跳行</el-checkbox
          >

          <el-checkbox
            v-if="basicInfoObj.unit_price_zero_no_prompt"
            class="checkboxStyle"
            key="unit_price_zero_no_prompt"
            true-label="1"
            false-label="0"
            v-model="basicInfoObj.unit_price_zero_no_prompt.value"
            >{{!isBaseVersion ? '入库单、' : ''}}出库单保存时单价为0不提示</el-checkbox
          >

          <el-checkbox
            v-if="basicInfoObj.show_zero_record"
            class="checkboxStyle"
            key="show_zero_record"
            true-label="1"
            false-label="0"
            v-model="basicInfoObj.show_zero_record.value"
            >显示为0记录</el-checkbox
          >
          <!-- <template v-for="(item, index) in basicInfoList">
            <el-checkbox v-if="index >= 27 && index < 32" class="checkboxStyle" :key="index" v-model="item.value"
              true-label="1" false-label="0">{{ getTitle(item.description) }}
            </el-checkbox>
          </template> -->
          <div class="averageNumber" v-if="!isBaseVersion">
            成本核算&nbsp;&nbsp; <el-input class="average" placeholder="移动加权平均法" disabled> </el-input>
          </div>
          <div class="averageNumber" v-if="basicInfoObj.store">
            商城地址&nbsp;&nbsp;
            <el-input class="average" placeholder="商城地址" v-model="basicInfoObj.store.value" :maxlength="64">
            </el-input>
          </div>
        </div>
      </div>
      <div class="one" v-if="basicInfoList.length > 0">
        <div class="infotitle">单据数据项小数位及显示格式</div>
        <div class="Rate" v-if="basicInfoObj.tax_rate" style="margin-top: 20px">
          <div class="txt">税率(%)</div>
          <el-input  v-model="basicInfoObj.tax_rate.value"> </el-input>
        </div>
        <div class="Rate" v-if="basicInfoObj.vat_rate">
          <div class="txt">增值税税率(%)</div>
          <el-input class="taxRate" v-model="basicInfoObj.vat_rate.value"> </el-input>
        </div>
        <div class="Rate" v-if="basicInfoObj.unit_price">
          <div class="txt">单价:</div>
          <div style="display: flex;flex-direction: column;margin-left: 0.562535rem;align-items: flex-end;">
            <el-select v-model="basicInfoObj.unit_price.value" placeholder="0" class="selectNumber">
              <el-option v-for="item in priceOptions" :key="item.value" :label="item.label" :value="item.value" :disabled="item.disabled"></el-option>
            </el-select>
            <span style="font-size: 11px;color: orangered;">小数位由小改大后将不能再改小,请慎重!</span>
          </div>
        </div>
        <div class="Rate" v-if="basicInfoObj.num">
          <div class="txt">数量:</div>
          
          <div style="display: flex;flex-direction: column;margin-left: 0.562535rem;align-items: flex-end;">
            <el-select v-model="basicInfoObj.num.value" placeholder="0" class="selectNumber">
              <el-option v-for="item in numOptions" :key="item.value" :label="item.label" :value="item.value" :disabled="item.disabled"></el-option>
            </el-select>
            <span style="font-size: 11px;color: orangered;">小数位由小改大后将不能再改小,请慎重!</span>
          </div>
        </div>
        <div class="Rate" v-if="basicInfoObj.price">
          <div class="txt">金额:</div>
          
          <div style="display: flex;flex-direction: column;margin-left: 0.562535rem;align-items: flex-end;">
            <el-select v-model="basicInfoObj.price.value" placeholder="0" class="selectNumber">
              <el-option v-for="item in moneyOptions" :key="item.value" :label="item.label" :value="item.value" :disabled="item.disabled"></el-option>
            </el-select>
            <span style="font-size: 11px;color: orangered;">小数位由小改大后将不能再改小,请慎重!</span>
          </div>
        </div>
        <span class="remind" style="margin-top: 10px">注:清空即可取消“数据显示格式”设置</span>

        <el-checkbox
          v-if="basicInfoObj.separator"
          class="checkboxStyle"
          key="separator"
          true-label="1"
          false-label="0"
          v-model="basicInfoObj.separator.value"
          >单价、金额使用千分位分隔符(1,234.00)</el-checkbox
        >
      </div>
    </div>
    <div class="resultCancel">
      <button class="handleResult" style="margin-right: 15px" @click="handleSave">保存</button>
      <button class="handleCancel" @click="onClose">取消</button>
    </div>
  </div>
</template>

<script>
import { getAction, postAction } from '@/api/manage'
import { ACCESS_TOKEN, TENANT_ID, ACCOUNT_BOOK } from '@/store/mutation-types'
import Vue from 'vue'
import { handleIsBaseVersion } from '@/utils'
export default {
  name: 'Business',
  data() {
    return {
      enteringinfo: {
        name: '',
        coding: '',
        barCode: '',
        beforRepetitionName: '',
        beforRepetitionCoding: '',
      },
      radio: '',
      priceOptions: [
        {
          text: '0',
          value: '0',
          disabled: false
        },
        {
          text: '0.00',
          value: '0.00',
          disabled: false
        },
        {
          text: '0.0000',
          value: '0.0000',
          disabled: false
        },
        {
          text: '0.00000000',
          value: '0.00000000',
          disabled: false
        },
        {
          text: '0.000000000000',
          value: '0.000000000000',
          disabled: false
        },
      ],
      moneyOptions: [
        {
          text: '0',
          value: '0',
          disabled: false
        },
        {
          text: '0.00',
          value: '0.00',
          disabled: false
        },
        {
          text: '0.0000',
          value: '0.0000',
          disabled: false
        },
        {
          text: '0.00000000',
          value: '0.00000000',
          disabled: false
        },
        {
          text: '0.000000000000',
          value: '0.000000000000',
          disabled: false
        },
      ],
      numOptions: [
        {
          text: '0',
          value: '0',
          disabled: false
        },
        {
          text: '0.00',
          value: '0.00',
          disabled: false
        },
        {
          text: '0.0000',
          value: '0.0000',
          disabled: false
        },
        {
          text: '0.00000000',
          value: '0.00000000',
          disabled: false
        },
      ],
      value: '',
      isSave: false, // true-保存、false-编辑
      basicInfoList: [],
      basicInfoObj: {},
      // 新账套默认列表
      sysConfigList: [
        {
          sysOrgCode: '',
          code: 'allow_goods_name_repeat',
          value: '0',
          options: '',
          description: '允许商品信息的名称重复： 1-允许，0-不允许',
        },
        {
          sysOrgCode: '',
          code: 'allow_goods_number_repeat',
          value: '0',
          options: null,
          description: '允许商品信息的编码重复： 1-允许，0-不允许',
        },
        {
          sysOrgCode: '',
          code: 'allow_goods_bar_code_repeat',
          value: '0',
          options: null,
          description: '允许商品信息的条形码重复： 1-允许，0-不允许',
        },
        {
          sysOrgCode: '',
          code: 'allow_company_express_storehouse_name_repeat',
          value: '0',
          options: null,
          description: '允许往来单位、物流公司、仓库名称重复： 1-允许，0-不允许',
        },
        {
          sysOrgCode: '',
          code: 'allow_company_express_storehouse_number_repeat',
          value: '0',
          options: null,
          description: '允许往来单位、物流公司、仓库编码重复： 1-允许，0-不允许',
        },
        {
          sysOrgCode: '',
          code: 'show_shorehouse_num',
          value: '0',
          options: null,
          description: '选择商品时显示库存数量 ： 1-显示，0-不显示',
        },
        {
          sysOrgCode: '',
          code: 'show_available_num',
          value: '0',
          options: null,
          description: '选择商品时显示可用数量 ： 1-显示，0-不显示',
        },
        {
          sysOrgCode: '',
          code: 'enable_storehouse_permission_area',
          value: '0',
          options: null,
          description: '启用仓库权限范围：1-启用，0-不启用',
        },
        {
          sysOrgCode: '',
          code: 'generate_order_number_on_save_or_verify',
          value: '1',
          options: null,
          description: '保存或审核后生成单据编号 ：1-保存后生成，0-审核后生成',
        },
        {
          sysOrgCode: '',
          code: 'allow_storehouse_alarm',
          value: '0',
          options: '',
          description: '允许库存报警：1-允许，0-不允许',
        },
        {
          sysOrgCode: '',
          code: 'allow_order_overdue_alarm',
          value: '0',
          options: null,
          description: '允许订单超期报警：1-允许，0-不允许',
        },
        {
          sysOrgCode: '',
          code: 'sell_below_cost_alarm',
          value: '0',
          options: '',
          description: '低于成本价销售报警：1-是，0-否',
        },
        {
          sysOrgCode: '',
          code: 'allow_overdue_current_account_alarm',
          value: '0',
          options: null,
          description: '允许超期往来账报警：1-是，0-否',
        },
        {
          sysOrgCode: '',
          code: 'allow_company_credit_alarm',
          value: '0',
          options: null,
          description: '允许往来单位信用额报警：1-是，0-否',
        },
        {
          sysOrgCode: '',
          code: 'salesman_not_received_payment_alarm',
          value: '0',
          options: '0',
          description: '业务员未收付款报警，逾期天数：（options）；   1-报警，0-不报警',
        },
        {
          sysOrgCode: '',
          code: 'prompt_sales_lower_cost',
          value: '0',
          options: null,
          description: '销售单价低于成本价时提示：1-提示，0-不提示',
        },
        {
          sysOrgCode: '',
          code: 'prompt_credit_limit',
          value: '0',
          options: null,
          description: '超出信用额度时提示：1-提示，0-不提示',
        },
        {
          sysOrgCode: '',
          code: 'prompt_print_limit',
          value: '0',
          options: '0',
          description: '打印超过指定次数时提示，打印次数：（options）；1-提示，0-不提示',
        },
        {
          sysOrgCode: '',
          code: 'enable_price_tracking',
          value: '0',
          options: null,
          description: '启用价格跟踪：1-启用，0-停用',
        },
        {
          sysOrgCode: '',
          code: 'enable_discount_tracking',
          value: '0',
          options: null,
          description: '启用折扣追踪：1-启用，0-不启用',
        },
        {
          sysOrgCode: '',
          code: 'allow_multi_line_entry_goods_info',
          value: '0',
          options: null,
          description: '允许同一商品信息多行录入：1-允许，0-禁止',
        },
        {
          sysOrgCode: '',
          code: 'open_new_order_after_document_saved',
          value: '0',
          options: null,
          description: '单据保存后立即开新单：1-是，0-否',
        },
        {
          sysOrgCode: '',
          code: 'verify_order_after_document_saved',
          value: '0',
          options: '',
          description: '单据保存后立即审核：1-是，0-否',
        },
        {
          sysOrgCode: '',
          code: 'open_new_order_after_document_verify',
          value: '0',
          options: null,
          description: '单据审核后立即开新单：1-是，0-否',
        },
        {
          sysOrgCode: '',
          code: 'allow_negative_inventory',
          value: '0',
          options: null,
          description: '允许负库存：1-允许，0-禁止',
        },
        {
          sysOrgCode: '',
          code: 'prompt_on_save',
          value: '0',
          options: null,
          description: '保存时提示 ：1-提示，0-不提示',
        },
        {
          sysOrgCode: '',
          code: 'prompt_on_verify',
          value: '0',
          options: null,
          description: '审核时提示 ：1-提示，0-不提示',
        },
        {
          sysOrgCode: '',
          code: 'print_after_save_sale',
          value: '0',
          options: null,
          description: '销售开单保存后立即打印：1-是，0-否',
        },
        {
          sysOrgCode: '',
          code: 'print_after_verify',
          value: '0',
          options: null,
          description: '单据审核后打印：1-是，0-否',
        },
        {
          sysOrgCode: '',
          code: 'skip_line_after_product_entry',
          value: '0',
          options: null,
          description: '商品录入后立即跳行：1-是，0-否',
        },
        {
          sysOrgCode: '',
          code: 'unit_price_zero_no_prompt',
          value: '0',
          options: null,
          description: '入库单、出库单保存时单价为0不提示 ：1-是，0-否',
        },
        {
          sysOrgCode: '',
          code: 'show_zero_record',
          value: '0',
          options: null,
          description: '显示为0记录 ：1-是，0-否',
        },
        {
          sysOrgCode: '',
          code: 'tax_rate',
          value: '3',
          options: '',
          description: '税率（%）',
        },
        {
          sysOrgCode: '',
          code: 'vat_rate',
          value: '13',
          options: '',
          description: '增值税税率 （%）',
        },
        {
          sysOrgCode: '',
          code: 'unit_price',
          value: '0.00',
          options: '',
          description: '单价',
        },
        {
          code: 'num',
          value: '0.00',
          options: '',
          description: '数量',
        },
        {
          sysOrgCode: '',
          code: 'price',
          value: '0.00',
          options: '',
          description: '金额',
        },
      ],
    }
  },
  computed: {
    isBaseVersion() {
      return handleIsBaseVersion()
    },
  },
  mounted() {
    let accountBook = Vue.ls.get(ACCOUNT_BOOK)
    this.accountBookId = accountBook && accountBook.id
    this.getSystemInfo()
  },
  methods: {
    edit() {
      this.getSystemInfo()
    },
    /**
     * 获取系统配置参数
     */
    async getSystemInfo() {
      const res = await getAction('/sysConfig/systemConfig/queryByXghAccountBookId', {
        xghAccountBookId: this.accountBookId,
      })
      if (res.code === 200) {
        console.log('----====---');
        
        let list = res.result.sysConfigList
        if (list.length > 0) {
          this.basicInfoList = res.result.sysConfigList
          this.$lcStorage.set('sysConfigList', this.basicInfoList)
          this.isSave = false
        } else {
          this.basicInfoList = this.sysConfigList
          this.isSave = true
        }
      } else {
        this.basicInfoList = this.sysConfigList
        this.isSave = true
      }

      //单价、数量、金额 小数位可变大不可变小
      let unit_price = this.basicInfoList.find(item => item.code === 'unit_price').value || '0'
      let num = this.basicInfoList.find(item => item.code === 'num').value || '0'
      let price = this.basicInfoList.find(item => item.code === 'price').value || '0'
      if (unit_price !== '0') {
        let unitIndex = this.priceOptions.findIndex(item => item.value === unit_price)
        this.priceOptions.forEach((item, index) => {
          item.disabled = index < unitIndex
        })
      }
      if (num !== '0') {
        let numIndex = this.numOptions.findIndex(item => item.value === num)
        this.numOptions.forEach((item, index) => {
          item.disabled = index < numIndex
        })
      }
      if (price !== '0') {
        let priceIndex = this.moneyOptions.findIndex(item => item.value === price)
        this.moneyOptions.forEach((item, index) => {
          item.disabled = index < priceIndex
        })
      }

      this.arrayToObject()
    },
    // 库存信息改变
    inventoryChange(value, index) {
      if (index == 'allow_negative_inventory') {
        if (value == 0) {
          this.basicInfoObj.prompt_on_verify.value = '1'
        }
      } else if (index == 'prompt_on_verify') {
        if (this.basicInfoObj.allow_negative_inventory.value == 0) {
          this.basicInfoObj.prompt_on_verify.value = '1'
        }
      }
    },
    // 保存
    handleSave() {
      const that = this
      let url = '/sysConfig/systemConfig/edit'
      if (this.isSave) {
        url = '/sysConfig/systemConfig/addSystemConfig'
      }
      postAction(url, {
        sysConfigList: this.objectToArray(),
        xghAccountBookId: this.accountBookId,
      }).then((res) => {
        if (res.code == 200) {
          that.$elMessage.success(res.message)
          that.isSave = false
          that.getSystemInfo()
          this.onClose()
        } else {
          that.$elMessage.error(res.message)
        }
      })
    },
    // 数组转对象
    arrayToObject() {
      this.basicInfoObj = {}
      this.basicInfoList.forEach((el) => {
        this.$set(this.basicInfoObj, el.code, el)
      })
      this.handleCountPriceData(
        (this.basicInfoObj.unit_price && this.basicInfoObj.unit_price.value) || '0',
        (this.basicInfoObj.num && this.basicInfoObj.num.value) || '0',
        (this.basicInfoObj.price && this.basicInfoObj.price.value) || '0'
      )
    },
    // 对象转数组
    objectToArray() {
      let list = []
      for (let key in this.basicInfoObj) {
        list.push(this.basicInfoObj[key])
      }
      return list
    },
    handleCountPriceData(priceDecimal, count, moneyDecimal) {
      // 对数量、金额、价格参数进行处理，得到小数点后位数，是否需要格式化价格、金额，遇千加','
      // 1、单价
      if (priceDecimal == '0') {
        priceDecimal = 0
      } else if (priceDecimal == '0.00') {
        priceDecimal = 2
      } else if (priceDecimal == '0.0000') {
        priceDecimal = 4
      } else if (priceDecimal == '0.00000000') {
        priceDecimal = 8
      } else if (priceDecimal == '0.000000000000') {
        priceDecimal = 12
      } else {
        priceDecimal = 0
      }
      // 2、金额
      if (moneyDecimal == '0') {
        moneyDecimal = 0
      } else if (moneyDecimal == '0.00') {
        moneyDecimal = 2
      } else if (moneyDecimal == '0.0000') {
        moneyDecimal = 4
      } else if (moneyDecimal == '0.00000000') {
        moneyDecimal = 8
      } else if (moneyDecimal == '0.000000000000') {
        moneyDecimal = 12
      } else {
        moneyDecimal = 0
      }
      // 3、数量
      if (count == '0') {
        count = 0
      } else if (count == '0.00') {
        count = 2
      } else if (count == '0.0000') {
        count = 4
      } else if (count == '0.00000000') {
        count = 8
      } else {
        count = 0
      }
      // 将结果缓存起来
      this.$lcStorage.set('toFixedList', {
        unitPrice: priceDecimal,
        number: count,
        allPrice: moneyDecimal,
        formatUnitPrice: this.basicInfoObj.separator.value == '1',
        formatAllPrice: this.basicInfoObj.separator.value == '1',
      })
    },
    // 取消
    onClose() {
      // this.getSystemInfo()
      this.$EventBus.$emit('closePage', '/setting/setSystem/setSystem')
    },
    // 包含冒号的截取
    getTitle(des) {
      if (des.indexOf('：') >= 0) {
        return des.split('：')[0]
      } else if (des.indexOf(':') >= 0) {
        return des.split(':')[0]
      } else {
        return des
      }
    },
  },
}
</script>

<style lang="scss" scoped>
// ::v-deep .el-input__inner {
//   width: 4.050253rem;
//   padding: 0;
//   // height: 0.562535rem;
//   height: 30px;
// }

::v-deep .el-input {
  width: max-content;
}

.averageNumber {
  font-size: 12px;
  margin-top: 0.375023rem;
}

.content {
  padding: 0 0.656291rem;
  margin-top: 0.375023rem;
  box-sizing: border-box;

  .activeBtn {
    display: flex;
    justify-content: center;
    margin-top: 0.281268rem;
  }

  .title {
    color: #1b94fb;
    box-sizing: border-box;
    font-size: 0.300019rem;
    line-height: 22px;
    font-weight: 600;
    padding-bottom: 0.375023rem;
    border-bottom: 0.018751rem solid #ddd;
    font-family: PingFang SC;
  }

  .containerContent {
    display: flex;
    margin-top: 0.468779rem;
    justify-content: space-between;

    .one {
      width: 5.250328rem;

      &:last-child {
        margin-right: 1.406338rem;
      }

      .checkbox {
        margin-top: 0.375023rem;

        .lastCheckbox {
          padding-bottom: 0.375023rem;
          width: 100%;
          border-bottom: 1px solid #eeeeee;
        }

        .radio {
          margin-top: 0.375023rem;
        }
      }

      .infotitle {
        padding-bottom: 0.187512rem;
        font-size: 14px;
        font-family: PingFang SC;
        font-weight: 500;
        line-height: 22px;
        border-bottom: 0.018751rem solid #eee;
      }
    }
  }
}

::v-deep .el-checkbox__label {
  font-size: 12px;
}

.btn {
  background: #fff;
  border: none;
  color: #666666;
  font-size: 12px;
  border-radius: 0.093756rem;
  width: 1.500094rem;
  height: 0.562535rem;
  border: 0.018751rem solid #dddddd;
}

.basic {
  color: #fff;
  background-color: #1993fb;
  margin-right: 0.375023rem;
}

::v-deep .is-checked {
  color: #1a93fa;
}

.border-top {
  margin-top: 0.375023rem;
  border-top: 1px solid #eee;
}

.hint {
  margin-top: 0.468779rem;
  border-top: 0.018751rem solid #eee;
  padding-top: 0.375023rem;
}

.taxRate {
  // width: 1.875117rem;
  // height: 0.562535rem;
  height: 30px;
  font-size: 12px;
  margin-left: 0.562535rem;
}

.Rate {
  width: 100%;
  font-size: 12px;
  // margin-top: 20px;
  margin: 10px 0;
  display: flex;
  justify-content: space-between;
}
.txt {
  height: 30px;
  line-height: 30px;
  flex-shrink: 0;
}

.selectNumber {
  // width: 1.875117rem;
  // margin-left: 0.562535rem;
  // height: 0.562535rem;
  // height: 30px;
}

.remind {
  font-size: 12px;
  color: rgb(74, 165, 252);
}

::v-deep .el-input__inner {
  width: 2.5rem;
  padding-left: 0.093756rem;
  height: 30px;
}

.average ::v-deep .el-input__inner {
  width: 4.050253rem;
  // height: 0.562535rem;
  height: 30px;
}

::v-deep .el-input__suffix {
  // right: -2.45rem;
  display: flex;
  align-items: center;
}

.checkboxStyle {
  display: block;
  margin-top: 10px;
  margin-bottom: 10px;
}

.handleCancel,
.handleResult {
  width: 60px;
  height: 30px;
  font-size: 14px;
  background-color: #fff;
  color: #666666;
  border: 1px solid #dddddd;
  border-radius: 5px;
}

.handleResult {
  background: #1890ff;
  color: #fff;
}

.resultCancel {
  margin-top: 38px;
  text-align: center;
}

.Active {
  color: #fff;
  background-color: #1993fb;
}
</style>